Call refresh in the domain_lookup and domain_lookup_by_name methods. This
authoremellor@ewan <emellor@ewan>
Sun, 2 Oct 2005 17:21:01 +0000 (18:21 +0100)
committeremellor@ewan <emellor@ewan>
Sun, 2 Oct 2005 17:21:01 +0000 (18:21 +0100)
should reduce the incidence of stale domain information being used by xend, but
is only a stop-gap.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendDomain.py

index 110d5310700a37cc6c01a3e76eb1992bb3419880..1d5ebce23198b11727516452abc729a6813ecfca 100644 (file)
@@ -271,9 +271,11 @@ class XendDomain:
 
 
     def domain_lookup(self, id):
+        self.refresh()
         return self.domains.get(id)
 
     def domain_lookup_by_name(self, name):
+        self.refresh()
         dominfo = self.domains.get_by_name(name)
         if not dominfo:
             try: